package com.example.a2032.activity;

import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentContainerView;

import com.example.a2032.R;
import com.example.a2032.fragment.ChatListFragment;
import com.example.a2032.fragment.ContactListFragment;
import com.example.a2032.fragment.OpFragment;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class ContactListActivity extends BaseActivity {

    @BindView(R.id.iv_title)
    ImageView ivTitle;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.fl_fragment)
    FragmentContainerView flFragment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_conversation_list);
        ButterKnife.bind(this);
     //   ContactListFragment contactListFragment = new ContactListFragment();
        ChatListFragment contactListFragment = new ChatListFragment();
        getSupportFragmentManager().beginTransaction().replace(R.id.fl_fragment, contactListFragment, "ConversationList").commit();
        String title=getIntent().getStringExtra(OpFragment.KEY_Title);
        tvTitle.setText(title);
    }

    @OnClick(R.id.iv_title)
    public void onViewClicked() {
        finish();
    }
}